-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't enumerate index_uid when requesting splits to gc #5489
Conversation
873d64d
to
a98ec47
Compare
a98ec47
to
5b63045
Compare
no-op refactoring.
5b63045
to
c1cf01d
Compare
if let Some(splits) = splits_metadata_to_delete_per_index.get_mut(&meta.index_uid) { | ||
splits.push(meta); | ||
} else { | ||
splits_metadata_to_delete_per_index.insert(meta.index_uid.clone(), vec![meta]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be expressed with the entry api, which imo is easier to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I was avoiding the needless 10k allocation, but yeah, maybe it does not matter. I will switch to the entry API.
.into_group_map(); | ||
for meta in splits_metadata_to_delete { | ||
if !storages.contains_key(&meta.index_uid) { | ||
info!(index_uid=?meta.index_uid, "split not listed in storage map: skipping"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this won't log often, but when it does, it may log a lot. this should be rate-limited
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 (i can't approve, this is technically my pr)
No description provided.